package com.avamanager.app.service.impl;

import java.util.List;
import com.avamanager.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.avamanager.app.mapper.AppStudentPlaceMapper;
import com.avamanager.app.domain.AppStudentPlace;
import com.avamanager.app.service.IAppStudentPlaceService;

/**
 * 学籍信息Service业务层处理
 * 
 * @author FenvyYe
 * @date 2022-08-15
 */
@Service
public class AppStudentPlaceServiceImpl implements IAppStudentPlaceService 
{
    @Autowired
    private AppStudentPlaceMapper appStudentPlaceMapper;

    /**
     * 查询学籍信息
     * 
     * @param studentPlaceId 学籍信息主键
     * @return 学籍信息
     */
    @Override
    public AppStudentPlace selectAppStudentPlaceByStudentPlaceId(Long studentPlaceId)
    {
        return appStudentPlaceMapper.selectAppStudentPlaceByStudentPlaceId(studentPlaceId);
    }

    /**
     * 查询学籍信息列表
     * 
     * @param appStudentPlace 学籍信息
     * @return 学籍信息
     */
    @Override
    public List<AppStudentPlace> selectAppStudentPlaceList(AppStudentPlace appStudentPlace)
    {
        return appStudentPlaceMapper.selectAppStudentPlaceList(appStudentPlace);
    }

    /**
     * 新增学籍信息
     * 
     * @param appStudentPlace 学籍信息
     * @return 结果
     */
    @Override
    public int insertAppStudentPlace(AppStudentPlace appStudentPlace)
    {
        appStudentPlace.setCreateTime(DateUtils.getNowDate());
        return appStudentPlaceMapper.insertAppStudentPlace(appStudentPlace);
    }

    /**
     * 修改学籍信息
     * 
     * @param appStudentPlace 学籍信息
     * @return 结果
     */
    @Override
    public int updateAppStudentPlace(AppStudentPlace appStudentPlace)
    {
        appStudentPlace.setUpdateTime(DateUtils.getNowDate());
        return appStudentPlaceMapper.updateAppStudentPlace(appStudentPlace);
    }

    /**
     * 批量删除学籍信息
     * 
     * @param studentPlaceIds 需要删除的学籍信息主键
     * @return 结果
     */
    @Override
    public int deleteAppStudentPlaceByStudentPlaceIds(Long[] studentPlaceIds)
    {
        return appStudentPlaceMapper.deleteAppStudentPlaceByStudentPlaceIds(studentPlaceIds);
    }

    /**
     * 删除学籍信息信息
     * 
     * @param studentPlaceId 学籍信息主键
     * @return 结果
     */
    @Override
    public int deleteAppStudentPlaceByStudentPlaceId(Long studentPlaceId)
    {
        return appStudentPlaceMapper.deleteAppStudentPlaceByStudentPlaceId(studentPlaceId);
    }
}
